1. Field of the Invention
The present invention relates to an image processing apparatus, an image processing method, and a program having a function for capturing a still image while a motion picture is captured, and more particularly, to an image processing apparatus, an image processing method, and a program product that are suitable for acquiring still image data encoded at a high speed in real time.
2. Description of the Related Art
In conventional image capturing apparatuses having a function for capturing a still image together with capturing a motion picture such as a digital camera and a digital video camera, similarly to an image capturing apparatus capturing only still images, generally, image data is stored as a non-compressed file or is stored as compressed data in the format of the Joint Photographic Experts Group (JPEG) or the like when a still image is captured and formed as a file. When a still image is formed as a file, usually, a sub-image (horizontal 160 pixels×vertical 120 pixels), which is used as an index, called a thumbnail is packaged in a file together with a main image having resolution that is the same as the resolution of an imaging device. From this, when a still image is reproduced, a thumbnail display of sub-images as index images having a small size is performed, and a user can check the still image and efficiently select the still image. This is defined in an exchangeable image file format (EXIF) that is an image file specification for digital cameras or the like.
As a conventional image capturing apparatus having a function for capturing a still image together with capturing a motion picture, for example, an electronic camera disclosed in Japanese Laid-open Patent Publication No. 2000-324434 has been known. In Japanese Laid-open Patent Publication No. 2000-324434, an electronic camera for performing recording such that a user does not feel strangeness at the time of reproducing a motion picture even when there is a non-continuous portion in the captured motion picture by preventing the number of captured still images from being limited in accordance with an internal memory has been disclosed.
In the electronic camera disclosed in Japanese Laid-open Patent Publication No. 2000-324434, when an instruction of a request for recording a still image is given during recording a motion picture, a captured still-image is stored in a storage unit in response to the request for recording a still image, the storage unit is prohibited from reading an image from an imaging device during a predetermined time, and, by repeatedly reading images stored in the storage unit during the time, captured still images are recorded in a motion picture recording unit as a motion picture in advance. In addition, during the motion picture processing of captured still images, still image processing is performed in which a captured still image stored in the storage unit is recorded in a still image recording unit as a still image, the prohibition is cancelled when the recording of the captured still image in the still image recording unit as a still image is completed or when a predetermined time elapses thereafter, and the recording operation is resumed in which images acquired from the imaging device are recorded in the motion picture recording unit as a motion picture.
In conventional image capturing apparatuses including that disclosed in Japanese Laid-open Patent Publication No. 2000-324434, generally, in order to capture a still image, image data acquired through an imaging device or the like is stored once in a main memory, and, after image correction or the like is performed for the image data, the image data is compressed in the JPEG format or the like, whereby a main image stream is generated. In addition, as necessary, the size of the image stored in the main memory is converted into the size of a thumbnail image, the image is compressed in the JPEG format or the like, whereby a thumbnail stream is generated. Then, by packaging these as an EXIF, a general JPEG file is generated. In a series of this process (hereinafter, referred to as a still image encoding process) due to processes such as:
(1) a process of writing image data into the main memory;
(2) a process of encoding read image data into the JPEG format while the image data is being read out from the main memory; and
(3) a process of writing encoded data into the main memory as a stream; many accesses to the main memory occur, thus the memory bus bandwidth is pressed. Accordingly, it is necessary to increase the memory processing clock frequency or widen the bus width, and consequently, there are problems of a high cost, an increase in the power consumption, and the like.
When the still image encoding process is performed at a high speed, the above-described problems become remarkable. Particularly, in a case where a still image is captured together with capturing a motion picture, a series of the still image encoding processes is necessary in which motion picture data acquired from the imaging device is written into the main memory, still image data is written into the main memory, the data is encoded and is rewritten into the main memory. However, in such a case, when the process of writing motion picture data into the main memory and the process of writing still image data into the main memory are simultaneously performed, the bus bandwidth of the memory is insufficient, and accordingly, it is impossible to acquire the still image data at a high speed.
In other words, as in the case of a conventional image capturing apparatus, in a case where the still image encoding process is performed simultaneously with a process accompanied with the capturing of a motion picture after still image data is written into a frame memory, the bandwidth of the bus of the frame memory is insufficient, and accordingly, writing and reading cannot be simultaneously performed during the same frame period. Accordingly, the still image encoding process for about ten or more frames or all the frames cannot be performed, and, for example, in the case of a motion picture configured by 60 frames per second, there is a problem in that it is necessary to select the number of frames that can be processed from among 60 frames and to form the selected frames as a JPEG file.
In addition, in a case where a reduced size such as ½ or ⅓ instead of the size of the image output from the imaging device is desired by the user as the size of the main image, it requires a time for the process of resizing the main image, and accordingly, the still image processing cannot be performed at a high speed.